package com.wuzhiming.istudy.service.impl;

import com.wuzhiming.istudy.controller.BaseController;
import com.wuzhiming.istudy.pojo.Collection;
import com.wuzhiming.istudy.service.BaseService;
import com.wuzhiming.istudy.service.CollectionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: CollectionServiceImpl
 * @Description:
 * @Author:zhimingw
 * @Version 1.0
 * @since 2022/3/16 19:58
 */
@Service("collectionService")
public class CollectionServiceImpl extends BaseService implements CollectionService  {
    @Override
    public boolean addCollection(Collection collection) {
        if(collectionMapper.addCollection(collection)==1){
            return true;
        }
        return false;
    }

    @Override
    public List<Collection> getCollection(Collection collection) {
        return collectionMapper.getCollection(collection);
    }

    @Override
    public boolean cancleCollection(Collection collection) {
        if(collectionMapper.cancleCollection(collection)==1){
            return true;
        }
        return false;
    }
}
